<?php
include('includes/connect.php');
if($_POST['id'])
{
$id=$_POST['id'];
$sql=mysql_query("SELECT * FROM categories where category_id = '$id'");
echo '<table border="0">';
while($row=mysql_fetch_array($sql))
{
echo '<tr><td><input type="checkbox" value="'.$row['category_id'].'" name="category_id[]" id="category_id[]" ></td><td>'.$row['category'].'</td></tr>';
}
echo '</table>';
}

?>